package com.aj.activity.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.aj.activity.R;

public class CenterRightMenberView extends LinearLayout {

	private Button mButton;
	private ImageView topline;
	private ImageView bottomline;

	public CenterRightMenberView(Context context) {
		super(context);
		initDraw(context);
	}

	public CenterRightMenberView(Context context, AttributeSet attrs) {
		super(context, attrs);
		initDraw(context);
	}

	private void initDraw(Context context) {
		View view = LayoutInflater.from(context).inflate(
				R.layout.center_right_member_layout, this, false);
		mButton = (Button) view.findViewById(R.id.mVerticalTextView);
		topline = (ImageView) view.findViewById(R.id.topline);
		bottomline = (ImageView) view.findViewById(R.id.bottomline);
		this.addView(view);
	}

	public void setText(CharSequence text) {
		mButton.setText(text);
	}

	public void setText(int resid) {
		mButton.setText(resid);
	}

	public void setTopLineVisibility(int visibility) {
		topline.setVisibility(visibility);
	}

	public void setBottomLineVisibility(int visibility) {
		bottomline.setVisibility(visibility);
	}

	@Override
	public void setBackgroundResource(int resid) {
		mButton.setBackgroundResource(resid);
	}
}
